package com.example.mahao_final.utils

import org.mindrot.jbcrypt.BCrypt

object PasswordUtils {

    // 加密密码
    fun hashPassword(password: String): String {
        return BCrypt.hashpw(password, BCrypt.gensalt())
    }

    // 验证密码
    fun checkPassword(password: String, hashedPassword: String): Boolean {
        return BCrypt.checkpw(password, hashedPassword)
    }
}
